package cn.sunshine.comprehensive.observer_mediator;

import java.util.function.Predicate;

/**
 * @Description 主题订阅接口: 通知
 * @Author Mokairui
 * @Since 2021/12/30
 */
public interface Subject {

    void attach(AbstractUser user);

    void detach(AbstractUser user);

//    void notify(String message, Class<? extends AbstractUser> clazz, Predicate<AbstractUser> userPredicate);
    void notify(String message, Predicate<AbstractUser> userPredicate);

}
